<!-- 发货 -->
<div class="float-confirm js_recommendDiv" style="z-index: 20000;display: none; width:auto;">
    <div class="float-confirm-con">
        <p style="font-size:18px;color:#23a18b;">输入物流编号发货</p>
        <div style="width:auto;height:1px;background:#CCC;margin-bottom:20px;"></div>
        <div style="width:500px;height:auto;margin-bottom:15px;">
            <table style="line-height:50px;" class="js_expressTable">
                <tr>
                    <td><span style="color:red;">*</span>物流公司：</td>
                    <td style="min-width:400px;">
                        <input type="text" name="express_name" class="js_express_name">
                    </td>
                </tr>
                <tr>
                    <td><span style="color:red;">*</span>物流编号：</td>
                    <td style="min-width:400px;">
                        <input type="text" name="express_no" class="js_express_no">
                    </td>
                </tr>
                <tr>
                    <td>备注：</td>
                    <td style="min-width:400px;">
                        <textarea name="express_note" class="add-f-area textarea_box js_express_note"></textarea>
                    </td>
                </tr>
            </table>
        </div>
        <div style="width:auto;height:1px;background:#CCC;margin-bottom:20px;"></div>
        <div class="float-confirm-btns" style="padding-bottom:30px;">
            <a id="js_allow" class="btn btn-success btn-sm left" href="javascript:void(0);">确定</a>
            <a class="btn btn-default btn-sm left js_cancel" href="javascript:void(0);">取消</a>
        </div>
    </div>
</div>
<script>
    (function ($) {
        //触发发货事件
        $('.js_deliveryBtn').click(function () {
            var order_id = $(this).closest('tr').data('id');
            showConfirmDiv($('.js_recommendDiv'), order_id);
        });

        // 同意发货操作
        $('#js_allow').click(function () {
            var express_name = $.trim($('.js_express_name').val());
            var express_no = $.trim($('.js_express_no').val());
            var express_note = $.trim($('.js_express_note').val());
            var id = $('.js_recommendDiv').data('id');

            if (!express_name || express_name == '') {
                showMsg('请填写物流公司名称');
                return false;
            }
            if (!express_no) {
                showMsg('请填写物流单号');
                return false;
            }
            showMask('正在提交中...', 1);
            $.post(
                    "{AnUrl('order/admin/shipping')}",
                    {
                        express_no: express_no,
                        express_name: express_name,
                        express_note: express_note,
                        id: id
                    },
                    function (data) {
                        if (data.info != 'ok') {
                            showMsg(data.info);
                        }
                        location.href = location.href;
                    },
                    'json'
            );
        });
    })(jQuery);
</script>
<!-- /发货 -->